package com.yitiao.designmodel.behave.chain.check;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * 处理器配置类,用来做基于注册中心的动态配置
 * {
 *   "handler": "nullValueCheckHandler",
 *   "down": false,
 *   "next": {
 *     "handler": "priceCheckHandler",
 *     "next": {
 *       "handler": "stockCheckHandler",
 *       "next": null
 *     }
 *   }
 * }
 */
@AllArgsConstructor
@Data
public class ProductCheckHandlerConfig {
    /**
     * 处理器Bean名称
     */
    private String handler;
    /**
     * 下一个处理器
     */
    private ProductCheckHandlerConfig next;
    /**
     * 是否降级
     */
    private Boolean down = Boolean.FALSE;
}
